<!--top-->
<?php if($this->route=='site/index'):?>
      <div class="top">
            <div class="warpper">
                  <div class="scroll"> <span class="left">公告：</span>
                        <div class="left">
                              <div class="scroll_content">
                                    <div id="top" class="scroll_list">
                                          <ul>
                                                <li><a href="#" title="网络交友因其所进行的活动都是通过网络进行1">网络交友因其所进行的活动都是通过网络进行1</a></li>
                                                <li><a href="#" title="网络交友因其所进行的活动都是通过网络进行2">网络交友因其所进行的活动都是通过网络进行2</a></li>
                                                <li><a href="#" title="网络交友因其所进行的活动都是通过网络进行3">网络交友因其所进行的活动都是通过网络进行3</a></li>
                                                <li><a href="#" title="网络交友因其所进行的活动都是通过网络进行4">网络交友因其所进行的活动都是通过网络进行4</a></li>
                                                <li><a href="#" title="网络交友因其所进行的活动都是通过网络进行5">网络交友因其所进行的活动都是通过网络进行5</a></li>
                                                <li><a href="#" title="网络交友因其所进行的活动都是通过网络进行6">网络交友因其所进行的活动都是通过网络进行6</a></li>
                                          </ul>
                                    </div>
                                    <div id="bottom" class="scroll_list"></div>
                              </div>
                        </div>
                  </div>
                  <div class="right">
                        <ul>
                              <li><a href="?r=site/regist" title="注册">注册</a></li>
                              <li class="login"><a href="javascript:void(0)" title="登陆">登陆</a> </li>
                        </ul>
                        <div class="login_in">
                              <form class="loginform1" action="?r=site/login" method="post">
                                <div class="text"> <span>
                                    <label>邮箱</label>
                                    <input type="text" name="username" class="user_name"/>
                              </span> <span>
                              <label>密码</label>
                              <input type="password" name="password" class="user_pass"/>
                        </span> </div>
                        <div id='msg1'></div>
                        <div class="action"> <span>
                          <input type="submit" name="submit" class="submit" value="登陆"/>
                    </span><span>
                    <input type="checkbox" checked="checked" name="rememberMe" class="checkbox"/>
              </span> <span><a href="#" title="一个月内免登陆">一个月内免登陆</a></span> </div>
        </form>
  </div>
</div>
</div>
</div>
<?php endif;?>
<!--brand-->
<div class="brand">
      <div class="warpper">
            <div class="logo"><img src="images/big_logo.jpg" width="223" height="49" alt="之嗅交友站"/>
                  <p>基于兴趣的单身交友平台，</p>
                  <p>结识同好，找到你的臭（xiù）味相投</p>
                  <p>公平，严肃，自由，健康，免费</p>
            </div>
            <div class="banner_box">
                  <div class="banner_pos">
                        <div class="banner">
                              <div class="banner_list">
                                    <ul class="img_list">
                                          <li><a href="#" ><img src="images/1.jpg" width="482" height="284" alt="index_banner01"/></a></li>
                                          <li><a href="#" ><img src="images/2.jpg" width="482" height="284" alt="index_banner02"/></a></li>
                                          <li><a href="#" ><img src="images/3.jpg" width="482" height="284" alt="index_banner03"/></a></li>
                                          <li><a href="#" ><img src="images/4.jpg" width="482" height="284" alt="index_banner04"/></a></li>
                                    </ul>
                                    <ul class="but_list">
                                          <li class="current">1</li>
                                          <li>2</li>
                                          <li>3</li>
                                          <li>4</li>
                                    </ul>
                              </div>
                        </div>
                  </div>
            </div>
      </div>
</div>

<!--regsiter-->
<div class="warpper">
      <div class="regsiter">
            <form class='loginform'   action="?r=site/login" method="post">

                  <div class="regsiter_list">
                        <p>邮箱</p>
                        <input id='my_email' type="text" name="username" class="regsiter_mail regs" maxlength=50/>
                  </div>
                  <div class="regsiter_list regsiter_list1">
                        <p>密码</p>
                        <input id='my_password' type="password" name="password" maxlength=25 class="regsiter_pass regs"/>
                  </div>
                  <div class="regsiter_list" id='msg'></div>
                  <div class="regsiter_list" style="width:360px; margin-top: 5px;">
                        <input id="regist" type="button" class="regsiter_submit left" style=" margin-right:10px;" value="注册"/>
                        <input type="submit" name="submit" class="regsiter_submit left" value="登录"/>
                  </div>
                  <div class="clear"></div>
            </form>
      </div>
</div>

<!--main-->
<div class="warpper">
      <div class="main">
            <div class="page_but"> <img src="images/user_hot.gif" width="85" height="29" alt="用户推荐" class="left"/>
                  
            </div>
            <div class="warp_content">
                  <div class="warp_list">
                        <div class="content">
                              <?php foreach($pops as $v):?>
                              
                              <div class="content_box">
                                    <div class="content_list">
                                      <a href="?r=space&id=<?php echo $v->id;?>">
                                          <div class="showbox"> <img src="<?php echo Utils::getAvatar($v->avatar);?>" width="180" height="180" alt="cocoli"/>
                                                <div class="show_main">
                                                      <h3><?php echo CHtml::encode($v->nickname);?></h3>
                                                      <p> <?php echo User::getSex($v->sex),'，',Utils::getAge($v->birth),'，',Area::getName($v->city_id);?><br/>
                                                            <?php foreach((array)$rs as $k=>$value): ?>
                                                            <span <?php  if($k===0):?>class="color"<?php endif;?>><?php  echo CHtml::encode($value['tag_name']);?></span>
                                                      <?php endforeach;?>
                                                </p>
                                          </div>
                                          <div class="alpha_bg1"></div>
                                          <div class="alpha_bg2"></div>
                                          <div class="show_infor">
                                                <h3><?php echo CHtml::encode($v->nickname);?></h3>
                                                <p> <?php echo User::getSex($v->sex),'，',Utils::getAge($v->birth),'，',Area::getName($v->city_id);?><br/>
                                                      <?php foreach((array)$rs as $k=>$value): ?>
                                                      <span <?php  if($k===0):?>class="color"<?php endif;?>><?php  echo CHtml::encode($value['tag_name']);?></span>
                                                <?php endforeach;?>
                                          </p>
                                          </div>
                                    </div>
                                    </a>
                                          </div>
                                    </div>
                                  
                                <?php endforeach;?>  
                              </div>
                        </div>
                  </div>
            </div>
      </div>

<script type="text/javascript">
$(document).ready(function() { 
  $('.regs').focus(function(){
    $('.regs').removeClass('redss');
  })
// prepare Options Object 
var options = { 
  target:     '#msg', 
    success:    function(data) { 
          if(data=='ok'){
            window.location.href="?r=home"; 
      }else{$('.regs').addClass('redss');}
} 
}; 

// pass options to ajaxForm 
$('.loginform').ajaxForm(options);

// prepare Options Object 
var optionsa = { 
    target:     '#msg1', 
    success:   function(data) {
    if(data=='ok'){
            window.location.href="?r=home"; 
      }else{alert(2);}
} 
}; 

// pass options to ajaxForm 
$('.loginform1').ajaxForm(optionsa);



      $('#regist').click(function(){
            var patten = /^([a-zA-Z0-9_-])+@([a-zA-Z0-9_-])+((\.[a-zA-Z0-9_-]{2,3}){1,2})$/;

            if(patten.test($('#my_email').val())){
                  $.cookie('tmp_email',$.trim($('#my_email').val()));
                  if($('#my_password').val())
                        $.cookie('tmp_password',$.trim($('#my_password').val()));
            }
            window.location.href='?r=site/regist';
      })  
}); 
</script>